<template>
  <div>
    <button @click="com='UserAccount'">显示用户账号组件</button>
    <button @click="com='UserInfo'">显示用户信息组件</button>  
    <!-- 注意字符串接收 -->
   <component :is="com"></component>
  </div>
</template>

<script>
import UserAccount from './components/UserAccount'
import UserInfo from './components/UserInfo'
export default {
    components:{
      UserAccount,
      UserInfo
    },

  data() {
    return {
      com:''
    };
  },

  mounted() {
    
  },

  methods: {
    
  },
};
</script>

<style >

</style>